﻿namespace OasisCiq.Xpil
{
    using System.Collections.Generic;
    using System.Collections.Specialized;
    using CommonTypes;
    using External;
    using XS;

    /// <summary>
    /// Universal telecommunication number structure
    /// </summary>
    public class ContactNumber : List<ContactNumberElement>, IValidityDateGroup, IDataQualityGroup, IExtendedAttributes
    {
        public ContactNumber()
        {
        }

        public ContactNumber(int capacity)
            : base(capacity)
        {
        }

        public ContactNumber(IEnumerable<ContactNumberElement> collection)
            : base(collection)
        {
        }

        /// <summary>
        /// Free text explanation of the communication line type. 
        /// e.g. telephone, land line, mobile, fax, pager, etc
        /// </summary>
        public CommunicationMediaTypeList CommunicationMediaType { get; set; }

        /// <summary>
        /// Status of the entity. e.g. Old, Current, Inactive, Active, etc
        /// Current Status of Contact Number
        /// </summary>
        public StatusList Status { get; set; }

        /// <summary>
        /// Nature of contact. Example: business, personal, 
        /// free call, toll free, after hours, etc
        /// </summary>
        public ContactNumberUsageList Usage { get; set; }

        /// <summary>
        /// Free text expression of contact hours. e.g. 9:00AM-5:00PM
        /// </summary>
        public CTString ContactHours { get; set; }

        /// <summary>
        /// Could be start date, issue date, validity start date, etc
        /// </summary>
        public XSDateTime DateValidFrom { get; set; }

        /// <summary>
        /// Could be end date, expiry date, validity end date, etc
        /// </summary>
        public XSDateTime DateValidTo { get; set; }

        /// <summary>
        /// This attribute indicates what level of trust can be given to the parent element.
        /// Omit this attribute if the data quality is unknown. If the data quality is known,
        /// the value is "Valid, else "InValid"
        /// </summary>
        public DataQualityTypeList DataQualityType { get; set; }

        /// <summary>
        /// Date the data quality is valid from
        /// </summary>
        public XSDateTime ValidFrom { get; set; }

        /// <summary>
        /// Date the data quality is valid to
        /// </summary>
        public XSDateTime ValidTo { get; set; }

        public NameValueCollection ExtendedAttributes { get; set; }
    }
}
